﻿using System;
using System.Globalization;
using System.Threading.Tasks;
using Sunny.Service;

namespace Sunny.Hangfire
{
    public class StatisticsUser
    {
        private readonly UserService _userService;

        public StatisticsUser(UserService userService)
        {
            _userService = userService;
        }
        public async Task Run()
        {
            Console.WriteLine($"开始执行：{DateTime.Now}");
            var userCount = await _userService.UserCount();
            Console.WriteLine($"用户数:"+userCount);
            Console.WriteLine($"结束执行：{DateTime.Now}");
        }
    }
}